import "@/assets/main.css";
import {createApp} from "vue";
import App from "@/App.vue";
import router from "@/router"; // 导入路由
import * as ElementPlusIconsVue from "@element-plus/icons-vue"; // 导入 Element Plus 图标
import "animate.css";
import "@/permission"; // 导入全局路由守卫
import "nprogress/nprogress.css"; // 页面顶部显示加载 Loading
import pinia from '@/stores'// 引入全局状态管理 Pinia

const app = createApp(App);

// 引入图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
// 应用路由
app.use(router);
app.mount("#app");

// 应用 Pinia
app.use(pinia)